/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * Protobuf type {@code GiftStruct}
 */
public final class GiftStruct extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:GiftStruct)
    GiftStructOrBuilder {
private static final long serialVersionUID = 0L;
  // Use GiftStruct.newBuilder() to construct.
  private GiftStruct(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private GiftStruct() {
    describe_ = "";
    name_ = "";
    region_ = "";
    manual_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new GiftStruct();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_GiftStruct_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_GiftStruct_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            GiftStruct.class, Builder.class);
  }

  private int bitField0_;
  public static final int IMAGE_FIELD_NUMBER = 1;
  private Image image_;
  /**
   * <code>.Image image = 1;</code>
   * @return Whether the image field is set.
   */
  @Override
  public boolean hasImage() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <code>.Image image = 1;</code>
   * @return The image.
   */
  @Override
  public Image getImage() {
    return image_ == null ? Image.getDefaultInstance() : image_;
  }
  /**
   * <code>.Image image = 1;</code>
   */
  @Override
  public ImageOrBuilder getImageOrBuilder() {
    return image_ == null ? Image.getDefaultInstance() : image_;
  }

  public static final int DESCRIBE_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private volatile Object describe_ = "";
  /**
   * <code>string describe = 2;</code>
   * @return The describe.
   */
  @Override
  public String getDescribe() {
    Object ref = describe_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      describe_ = s;
      return s;
    }
  }
  /**
   * <code>string describe = 2;</code>
   * @return The bytes for describe.
   */
  @Override
  public com.google.protobuf.ByteString
      getDescribeBytes() {
    Object ref = describe_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      describe_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int NOTIFY_FIELD_NUMBER = 3;
  private boolean notify_ = false;
  /**
   * <code>bool notify = 3;</code>
   * @return The notify.
   */
  @Override
  public boolean getNotify() {
    return notify_;
  }

  public static final int DURATION_FIELD_NUMBER = 4;
  private long duration_ = 0L;
  /**
   * <code>uint64 duration = 4;</code>
   * @return The duration.
   */
  @Override
  public long getDuration() {
    return duration_;
  }

  public static final int ID_FIELD_NUMBER = 5;
  private long id_ = 0L;
  /**
   * <code>uint64 id = 5;</code>
   * @return The id.
   */
  @Override
  public long getId() {
    return id_;
  }

  public static final int FORLINKMIC_FIELD_NUMBER = 7;
  private boolean forLinkmic_ = false;
  /**
   * <pre>
   *  GiftStructFansClubInfo fansclubInfo = 6;
   * </pre>
   *
   * <code>bool forLinkmic = 7;</code>
   * @return The forLinkmic.
   */
  @Override
  public boolean getForLinkmic() {
    return forLinkmic_;
  }

  public static final int DOODLE_FIELD_NUMBER = 8;
  private boolean doodle_ = false;
  /**
   * <code>bool doodle = 8;</code>
   * @return The doodle.
   */
  @Override
  public boolean getDoodle() {
    return doodle_;
  }

  public static final int FORFANSCLUB_FIELD_NUMBER = 9;
  private boolean forFansclub_ = false;
  /**
   * <code>bool forFansclub = 9;</code>
   * @return The forFansclub.
   */
  @Override
  public boolean getForFansclub() {
    return forFansclub_;
  }

  public static final int COMBO_FIELD_NUMBER = 10;
  private boolean combo_ = false;
  /**
   * <code>bool combo = 10;</code>
   * @return The combo.
   */
  @Override
  public boolean getCombo() {
    return combo_;
  }

  public static final int TYPE_FIELD_NUMBER = 11;
  private int type_ = 0;
  /**
   * <code>uint32 type = 11;</code>
   * @return The type.
   */
  @Override
  public int getType() {
    return type_;
  }

  public static final int DIAMONDCOUNT_FIELD_NUMBER = 12;
  private int diamondCount_ = 0;
  /**
   * <code>uint32 diamondCount = 12;</code>
   * @return The diamondCount.
   */
  @Override
  public int getDiamondCount() {
    return diamondCount_;
  }

  public static final int ISDISPLAYEDONPANEL_FIELD_NUMBER = 13;
  private boolean isDisplayedOnPanel_ = false;
  /**
   * <code>bool isDisplayedOnPanel = 13;</code>
   * @return The isDisplayedOnPanel.
   */
  @Override
  public boolean getIsDisplayedOnPanel() {
    return isDisplayedOnPanel_;
  }

  public static final int PRIMARYEFFECTID_FIELD_NUMBER = 14;
  private long primaryEffectId_ = 0L;
  /**
   * <code>uint64 primaryEffectId = 14;</code>
   * @return The primaryEffectId.
   */
  @Override
  public long getPrimaryEffectId() {
    return primaryEffectId_;
  }

  public static final int GIFTLABELICON_FIELD_NUMBER = 15;
  private Image giftLabelIcon_;
  /**
   * <code>.Image giftLabelIcon = 15;</code>
   * @return Whether the giftLabelIcon field is set.
   */
  @Override
  public boolean hasGiftLabelIcon() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * <code>.Image giftLabelIcon = 15;</code>
   * @return The giftLabelIcon.
   */
  @Override
  public Image getGiftLabelIcon() {
    return giftLabelIcon_ == null ? Image.getDefaultInstance() : giftLabelIcon_;
  }
  /**
   * <code>.Image giftLabelIcon = 15;</code>
   */
  @Override
  public ImageOrBuilder getGiftLabelIconOrBuilder() {
    return giftLabelIcon_ == null ? Image.getDefaultInstance() : giftLabelIcon_;
  }

  public static final int NAME_FIELD_NUMBER = 16;
  @SuppressWarnings("serial")
  private volatile Object name_ = "";
  /**
   * <code>string name = 16;</code>
   * @return The name.
   */
  @Override
  public String getName() {
    Object ref = name_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * <code>string name = 16;</code>
   * @return The bytes for name.
   */
  @Override
  public com.google.protobuf.ByteString
      getNameBytes() {
    Object ref = name_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REGION_FIELD_NUMBER = 17;
  @SuppressWarnings("serial")
  private volatile Object region_ = "";
  /**
   * <code>string region = 17;</code>
   * @return The region.
   */
  @Override
  public String getRegion() {
    Object ref = region_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      region_ = s;
      return s;
    }
  }
  /**
   * <code>string region = 17;</code>
   * @return The bytes for region.
   */
  @Override
  public com.google.protobuf.ByteString
      getRegionBytes() {
    Object ref = region_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      region_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MANUAL_FIELD_NUMBER = 18;
  @SuppressWarnings("serial")
  private volatile Object manual_ = "";
  /**
   * <code>string manual = 18;</code>
   * @return The manual.
   */
  @Override
  public String getManual() {
    Object ref = manual_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      manual_ = s;
      return s;
    }
  }
  /**
   * <code>string manual = 18;</code>
   * @return The bytes for manual.
   */
  @Override
  public com.google.protobuf.ByteString
      getManualBytes() {
    Object ref = manual_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      manual_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FORCUSTOM_FIELD_NUMBER = 19;
  private boolean forCustom_ = false;
  /**
   * <code>bool forCustom = 19;</code>
   * @return The forCustom.
   */
  @Override
  public boolean getForCustom() {
    return forCustom_;
  }

  public static final int ICON_FIELD_NUMBER = 21;
  private Image icon_;
  /**
   * <pre>
   *  specialEffectsMap = 20;
   * </pre>
   *
   * <code>.Image icon = 21;</code>
   * @return Whether the icon field is set.
   */
  @Override
  public boolean hasIcon() {
    return ((bitField0_ & 0x00000004) != 0);
  }
  /**
   * <pre>
   *  specialEffectsMap = 20;
   * </pre>
   *
   * <code>.Image icon = 21;</code>
   * @return The icon.
   */
  @Override
  public Image getIcon() {
    return icon_ == null ? Image.getDefaultInstance() : icon_;
  }
  /**
   * <pre>
   *  specialEffectsMap = 20;
   * </pre>
   *
   * <code>.Image icon = 21;</code>
   */
  @Override
  public ImageOrBuilder getIconOrBuilder() {
    return icon_ == null ? Image.getDefaultInstance() : icon_;
  }

  public static final int ACTIONTYPE_FIELD_NUMBER = 22;
  private int actionType_ = 0;
  /**
   * <pre>
   * fixme 后面的就不写了还有几十个属性
   * </pre>
   *
   * <code>uint32 actionType = 22;</code>
   * @return The actionType.
   */
  @Override
  public int getActionType() {
    return actionType_;
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getImage());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, describe_);
    }
    if (notify_ != false) {
      output.writeBool(3, notify_);
    }
    if (duration_ != 0L) {
      output.writeUInt64(4, duration_);
    }
    if (id_ != 0L) {
      output.writeUInt64(5, id_);
    }
    if (forLinkmic_ != false) {
      output.writeBool(7, forLinkmic_);
    }
    if (doodle_ != false) {
      output.writeBool(8, doodle_);
    }
    if (forFansclub_ != false) {
      output.writeBool(9, forFansclub_);
    }
    if (combo_ != false) {
      output.writeBool(10, combo_);
    }
    if (type_ != 0) {
      output.writeUInt32(11, type_);
    }
    if (diamondCount_ != 0) {
      output.writeUInt32(12, diamondCount_);
    }
    if (isDisplayedOnPanel_ != false) {
      output.writeBool(13, isDisplayedOnPanel_);
    }
    if (primaryEffectId_ != 0L) {
      output.writeUInt64(14, primaryEffectId_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(15, getGiftLabelIcon());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, region_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manual_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 18, manual_);
    }
    if (forCustom_ != false) {
      output.writeBool(19, forCustom_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(21, getIcon());
    }
    if (actionType_ != 0) {
      output.writeUInt32(22, actionType_);
    }
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getImage());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, describe_);
    }
    if (notify_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(3, notify_);
    }
    if (duration_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(4, duration_);
    }
    if (id_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(5, id_);
    }
    if (forLinkmic_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(7, forLinkmic_);
    }
    if (doodle_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(8, doodle_);
    }
    if (forFansclub_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(9, forFansclub_);
    }
    if (combo_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(10, combo_);
    }
    if (type_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(11, type_);
    }
    if (diamondCount_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(12, diamondCount_);
    }
    if (isDisplayedOnPanel_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(13, isDisplayedOnPanel_);
    }
    if (primaryEffectId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(14, primaryEffectId_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(15, getGiftLabelIcon());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, region_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manual_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, manual_);
    }
    if (forCustom_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(19, forCustom_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(21, getIcon());
    }
    if (actionType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(22, actionType_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof GiftStruct)) {
      return super.equals(obj);
    }
    GiftStruct other = (GiftStruct) obj;

    if (hasImage() != other.hasImage()) return false;
    if (hasImage()) {
      if (!getImage()
          .equals(other.getImage())) return false;
    }
    if (!getDescribe()
        .equals(other.getDescribe())) return false;
    if (getNotify()
        != other.getNotify()) return false;
    if (getDuration()
        != other.getDuration()) return false;
    if (getId()
        != other.getId()) return false;
    if (getForLinkmic()
        != other.getForLinkmic()) return false;
    if (getDoodle()
        != other.getDoodle()) return false;
    if (getForFansclub()
        != other.getForFansclub()) return false;
    if (getCombo()
        != other.getCombo()) return false;
    if (getType()
        != other.getType()) return false;
    if (getDiamondCount()
        != other.getDiamondCount()) return false;
    if (getIsDisplayedOnPanel()
        != other.getIsDisplayedOnPanel()) return false;
    if (getPrimaryEffectId()
        != other.getPrimaryEffectId()) return false;
    if (hasGiftLabelIcon() != other.hasGiftLabelIcon()) return false;
    if (hasGiftLabelIcon()) {
      if (!getGiftLabelIcon()
          .equals(other.getGiftLabelIcon())) return false;
    }
    if (!getName()
        .equals(other.getName())) return false;
    if (!getRegion()
        .equals(other.getRegion())) return false;
    if (!getManual()
        .equals(other.getManual())) return false;
    if (getForCustom()
        != other.getForCustom()) return false;
    if (hasIcon() != other.hasIcon()) return false;
    if (hasIcon()) {
      if (!getIcon()
          .equals(other.getIcon())) return false;
    }
    if (getActionType()
        != other.getActionType()) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasImage()) {
      hash = (37 * hash) + IMAGE_FIELD_NUMBER;
      hash = (53 * hash) + getImage().hashCode();
    }
    hash = (37 * hash) + DESCRIBE_FIELD_NUMBER;
    hash = (53 * hash) + getDescribe().hashCode();
    hash = (37 * hash) + NOTIFY_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getNotify());
    hash = (37 * hash) + DURATION_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getDuration());
    hash = (37 * hash) + ID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getId());
    hash = (37 * hash) + FORLINKMIC_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getForLinkmic());
    hash = (37 * hash) + DOODLE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getDoodle());
    hash = (37 * hash) + FORFANSCLUB_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getForFansclub());
    hash = (37 * hash) + COMBO_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getCombo());
    hash = (37 * hash) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getType();
    hash = (37 * hash) + DIAMONDCOUNT_FIELD_NUMBER;
    hash = (53 * hash) + getDiamondCount();
    hash = (37 * hash) + ISDISPLAYEDONPANEL_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getIsDisplayedOnPanel());
    hash = (37 * hash) + PRIMARYEFFECTID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getPrimaryEffectId());
    if (hasGiftLabelIcon()) {
      hash = (37 * hash) + GIFTLABELICON_FIELD_NUMBER;
      hash = (53 * hash) + getGiftLabelIcon().hashCode();
    }
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + REGION_FIELD_NUMBER;
    hash = (53 * hash) + getRegion().hashCode();
    hash = (37 * hash) + MANUAL_FIELD_NUMBER;
    hash = (53 * hash) + getManual().hashCode();
    hash = (37 * hash) + FORCUSTOM_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getForCustom());
    if (hasIcon()) {
      hash = (37 * hash) + ICON_FIELD_NUMBER;
      hash = (53 * hash) + getIcon().hashCode();
    }
    hash = (37 * hash) + ACTIONTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getActionType();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static GiftStruct parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static GiftStruct parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static GiftStruct parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static GiftStruct parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static GiftStruct parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static GiftStruct parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static GiftStruct parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static GiftStruct parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static GiftStruct parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static GiftStruct parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static GiftStruct parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static GiftStruct parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(GiftStruct prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code GiftStruct}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:GiftStruct)
      GiftStructOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_GiftStruct_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_GiftStruct_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              GiftStruct.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.GiftStruct.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getImageFieldBuilder();
        getGiftLabelIconFieldBuilder();
        getIconFieldBuilder();
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      image_ = null;
      if (imageBuilder_ != null) {
        imageBuilder_.dispose();
        imageBuilder_ = null;
      }
      describe_ = "";
      notify_ = false;
      duration_ = 0L;
      id_ = 0L;
      forLinkmic_ = false;
      doodle_ = false;
      forFansclub_ = false;
      combo_ = false;
      type_ = 0;
      diamondCount_ = 0;
      isDisplayedOnPanel_ = false;
      primaryEffectId_ = 0L;
      giftLabelIcon_ = null;
      if (giftLabelIconBuilder_ != null) {
        giftLabelIconBuilder_.dispose();
        giftLabelIconBuilder_ = null;
      }
      name_ = "";
      region_ = "";
      manual_ = "";
      forCustom_ = false;
      icon_ = null;
      if (iconBuilder_ != null) {
        iconBuilder_.dispose();
        iconBuilder_ = null;
      }
      actionType_ = 0;
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_GiftStruct_descriptor;
    }

    @Override
    public GiftStruct getDefaultInstanceForType() {
      return GiftStruct.getDefaultInstance();
    }

    @Override
    public GiftStruct build() {
      GiftStruct result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public GiftStruct buildPartial() {
      GiftStruct result = new GiftStruct(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(GiftStruct result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.image_ = imageBuilder_ == null
            ? image_
            : imageBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.describe_ = describe_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.notify_ = notify_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.duration_ = duration_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.id_ = id_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.forLinkmic_ = forLinkmic_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.doodle_ = doodle_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.forFansclub_ = forFansclub_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.combo_ = combo_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.type_ = type_;
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.diamondCount_ = diamondCount_;
      }
      if (((from_bitField0_ & 0x00000800) != 0)) {
        result.isDisplayedOnPanel_ = isDisplayedOnPanel_;
      }
      if (((from_bitField0_ & 0x00001000) != 0)) {
        result.primaryEffectId_ = primaryEffectId_;
      }
      if (((from_bitField0_ & 0x00002000) != 0)) {
        result.giftLabelIcon_ = giftLabelIconBuilder_ == null
            ? giftLabelIcon_
            : giftLabelIconBuilder_.build();
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00004000) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00008000) != 0)) {
        result.region_ = region_;
      }
      if (((from_bitField0_ & 0x00010000) != 0)) {
        result.manual_ = manual_;
      }
      if (((from_bitField0_ & 0x00020000) != 0)) {
        result.forCustom_ = forCustom_;
      }
      if (((from_bitField0_ & 0x00040000) != 0)) {
        result.icon_ = iconBuilder_ == null
            ? icon_
            : iconBuilder_.build();
        to_bitField0_ |= 0x00000004;
      }
      if (((from_bitField0_ & 0x00080000) != 0)) {
        result.actionType_ = actionType_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof GiftStruct) {
        return mergeFrom((GiftStruct)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(GiftStruct other) {
      if (other == GiftStruct.getDefaultInstance()) return this;
      if (other.hasImage()) {
        mergeImage(other.getImage());
      }
      if (!other.getDescribe().isEmpty()) {
        describe_ = other.describe_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (other.getNotify() != false) {
        setNotify(other.getNotify());
      }
      if (other.getDuration() != 0L) {
        setDuration(other.getDuration());
      }
      if (other.getId() != 0L) {
        setId(other.getId());
      }
      if (other.getForLinkmic() != false) {
        setForLinkmic(other.getForLinkmic());
      }
      if (other.getDoodle() != false) {
        setDoodle(other.getDoodle());
      }
      if (other.getForFansclub() != false) {
        setForFansclub(other.getForFansclub());
      }
      if (other.getCombo() != false) {
        setCombo(other.getCombo());
      }
      if (other.getType() != 0) {
        setType(other.getType());
      }
      if (other.getDiamondCount() != 0) {
        setDiamondCount(other.getDiamondCount());
      }
      if (other.getIsDisplayedOnPanel() != false) {
        setIsDisplayedOnPanel(other.getIsDisplayedOnPanel());
      }
      if (other.getPrimaryEffectId() != 0L) {
        setPrimaryEffectId(other.getPrimaryEffectId());
      }
      if (other.hasGiftLabelIcon()) {
        mergeGiftLabelIcon(other.getGiftLabelIcon());
      }
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00004000;
        onChanged();
      }
      if (!other.getRegion().isEmpty()) {
        region_ = other.region_;
        bitField0_ |= 0x00008000;
        onChanged();
      }
      if (!other.getManual().isEmpty()) {
        manual_ = other.manual_;
        bitField0_ |= 0x00010000;
        onChanged();
      }
      if (other.getForCustom() != false) {
        setForCustom(other.getForCustom());
      }
      if (other.hasIcon()) {
        mergeIcon(other.getIcon());
      }
      if (other.getActionType() != 0) {
        setActionType(other.getActionType());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              input.readMessage(
                  getImageFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              describe_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 24: {
              notify_ = input.readBool();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 32: {
              duration_ = input.readUInt64();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 40: {
              id_ = input.readUInt64();
              bitField0_ |= 0x00000010;
              break;
            } // case 40
            case 56: {
              forLinkmic_ = input.readBool();
              bitField0_ |= 0x00000020;
              break;
            } // case 56
            case 64: {
              doodle_ = input.readBool();
              bitField0_ |= 0x00000040;
              break;
            } // case 64
            case 72: {
              forFansclub_ = input.readBool();
              bitField0_ |= 0x00000080;
              break;
            } // case 72
            case 80: {
              combo_ = input.readBool();
              bitField0_ |= 0x00000100;
              break;
            } // case 80
            case 88: {
              type_ = input.readUInt32();
              bitField0_ |= 0x00000200;
              break;
            } // case 88
            case 96: {
              diamondCount_ = input.readUInt32();
              bitField0_ |= 0x00000400;
              break;
            } // case 96
            case 104: {
              isDisplayedOnPanel_ = input.readBool();
              bitField0_ |= 0x00000800;
              break;
            } // case 104
            case 112: {
              primaryEffectId_ = input.readUInt64();
              bitField0_ |= 0x00001000;
              break;
            } // case 112
            case 122: {
              input.readMessage(
                  getGiftLabelIconFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00002000;
              break;
            } // case 122
            case 130: {
              name_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00004000;
              break;
            } // case 130
            case 138: {
              region_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00008000;
              break;
            } // case 138
            case 146: {
              manual_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00010000;
              break;
            } // case 146
            case 152: {
              forCustom_ = input.readBool();
              bitField0_ |= 0x00020000;
              break;
            } // case 152
            case 170: {
              input.readMessage(
                  getIconFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00040000;
              break;
            } // case 170
            case 176: {
              actionType_ = input.readUInt32();
              bitField0_ |= 0x00080000;
              break;
            } // case 176
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private Image image_;
    private com.google.protobuf.SingleFieldBuilderV3<
        Image, Image.Builder, ImageOrBuilder> imageBuilder_;
    /**
     * <code>.Image image = 1;</code>
     * @return Whether the image field is set.
     */
    public boolean hasImage() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>.Image image = 1;</code>
     * @return The image.
     */
    public Image getImage() {
      if (imageBuilder_ == null) {
        return image_ == null ? Image.getDefaultInstance() : image_;
      } else {
        return imageBuilder_.getMessage();
      }
    }
    /**
     * <code>.Image image = 1;</code>
     */
    public Builder setImage(Image value) {
      if (imageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        image_ = value;
      } else {
        imageBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.Image image = 1;</code>
     */
    public Builder setImage(
        Image.Builder builderForValue) {
      if (imageBuilder_ == null) {
        image_ = builderForValue.build();
      } else {
        imageBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.Image image = 1;</code>
     */
    public Builder mergeImage(Image value) {
      if (imageBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0) &&
          image_ != null &&
          image_ != Image.getDefaultInstance()) {
          getImageBuilder().mergeFrom(value);
        } else {
          image_ = value;
        }
      } else {
        imageBuilder_.mergeFrom(value);
      }
      if (image_ != null) {
        bitField0_ |= 0x00000001;
        onChanged();
      }
      return this;
    }
    /**
     * <code>.Image image = 1;</code>
     */
    public Builder clearImage() {
      bitField0_ = (bitField0_ & ~0x00000001);
      image_ = null;
      if (imageBuilder_ != null) {
        imageBuilder_.dispose();
        imageBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <code>.Image image = 1;</code>
     */
    public Image.Builder getImageBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getImageFieldBuilder().getBuilder();
    }
    /**
     * <code>.Image image = 1;</code>
     */
    public ImageOrBuilder getImageOrBuilder() {
      if (imageBuilder_ != null) {
        return imageBuilder_.getMessageOrBuilder();
      } else {
        return image_ == null ?
            Image.getDefaultInstance() : image_;
      }
    }
    /**
     * <code>.Image image = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        Image, Image.Builder, ImageOrBuilder>
        getImageFieldBuilder() {
      if (imageBuilder_ == null) {
        imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            Image, Image.Builder, ImageOrBuilder>(
                getImage(),
                getParentForChildren(),
                isClean());
        image_ = null;
      }
      return imageBuilder_;
    }

    private Object describe_ = "";
    /**
     * <code>string describe = 2;</code>
     * @return The describe.
     */
    public String getDescribe() {
      Object ref = describe_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        describe_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string describe = 2;</code>
     * @return The bytes for describe.
     */
    public com.google.protobuf.ByteString
        getDescribeBytes() {
      Object ref = describe_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        describe_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string describe = 2;</code>
     * @param value The describe to set.
     * @return This builder for chaining.
     */
    public Builder setDescribe(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      describe_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>string describe = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearDescribe() {
      describe_ = getDefaultInstance().getDescribe();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <code>string describe = 2;</code>
     * @param value The bytes for describe to set.
     * @return This builder for chaining.
     */
    public Builder setDescribeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      describe_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private boolean notify_ ;
    /**
     * <code>bool notify = 3;</code>
     * @return The notify.
     */
    @Override
    public boolean getNotify() {
      return notify_;
    }
    /**
     * <code>bool notify = 3;</code>
     * @param value The notify to set.
     * @return This builder for chaining.
     */
    public Builder setNotify(boolean value) {

      notify_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>bool notify = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearNotify() {
      bitField0_ = (bitField0_ & ~0x00000004);
      notify_ = false;
      onChanged();
      return this;
    }

    private long duration_ ;
    /**
     * <code>uint64 duration = 4;</code>
     * @return The duration.
     */
    @Override
    public long getDuration() {
      return duration_;
    }
    /**
     * <code>uint64 duration = 4;</code>
     * @param value The duration to set.
     * @return This builder for chaining.
     */
    public Builder setDuration(long value) {

      duration_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 duration = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearDuration() {
      bitField0_ = (bitField0_ & ~0x00000008);
      duration_ = 0L;
      onChanged();
      return this;
    }

    private long id_ ;
    /**
     * <code>uint64 id = 5;</code>
     * @return The id.
     */
    @Override
    public long getId() {
      return id_;
    }
    /**
     * <code>uint64 id = 5;</code>
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(long value) {

      id_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 id = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearId() {
      bitField0_ = (bitField0_ & ~0x00000010);
      id_ = 0L;
      onChanged();
      return this;
    }

    private boolean forLinkmic_ ;
    /**
     * <pre>
     *  GiftStructFansClubInfo fansclubInfo = 6;
     * </pre>
     *
     * <code>bool forLinkmic = 7;</code>
     * @return The forLinkmic.
     */
    @Override
    public boolean getForLinkmic() {
      return forLinkmic_;
    }
    /**
     * <pre>
     *  GiftStructFansClubInfo fansclubInfo = 6;
     * </pre>
     *
     * <code>bool forLinkmic = 7;</code>
     * @param value The forLinkmic to set.
     * @return This builder for chaining.
     */
    public Builder setForLinkmic(boolean value) {

      forLinkmic_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  GiftStructFansClubInfo fansclubInfo = 6;
     * </pre>
     *
     * <code>bool forLinkmic = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearForLinkmic() {
      bitField0_ = (bitField0_ & ~0x00000020);
      forLinkmic_ = false;
      onChanged();
      return this;
    }

    private boolean doodle_ ;
    /**
     * <code>bool doodle = 8;</code>
     * @return The doodle.
     */
    @Override
    public boolean getDoodle() {
      return doodle_;
    }
    /**
     * <code>bool doodle = 8;</code>
     * @param value The doodle to set.
     * @return This builder for chaining.
     */
    public Builder setDoodle(boolean value) {

      doodle_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * <code>bool doodle = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearDoodle() {
      bitField0_ = (bitField0_ & ~0x00000040);
      doodle_ = false;
      onChanged();
      return this;
    }

    private boolean forFansclub_ ;
    /**
     * <code>bool forFansclub = 9;</code>
     * @return The forFansclub.
     */
    @Override
    public boolean getForFansclub() {
      return forFansclub_;
    }
    /**
     * <code>bool forFansclub = 9;</code>
     * @param value The forFansclub to set.
     * @return This builder for chaining.
     */
    public Builder setForFansclub(boolean value) {

      forFansclub_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * <code>bool forFansclub = 9;</code>
     * @return This builder for chaining.
     */
    public Builder clearForFansclub() {
      bitField0_ = (bitField0_ & ~0x00000080);
      forFansclub_ = false;
      onChanged();
      return this;
    }

    private boolean combo_ ;
    /**
     * <code>bool combo = 10;</code>
     * @return The combo.
     */
    @Override
    public boolean getCombo() {
      return combo_;
    }
    /**
     * <code>bool combo = 10;</code>
     * @param value The combo to set.
     * @return This builder for chaining.
     */
    public Builder setCombo(boolean value) {

      combo_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     * <code>bool combo = 10;</code>
     * @return This builder for chaining.
     */
    public Builder clearCombo() {
      bitField0_ = (bitField0_ & ~0x00000100);
      combo_ = false;
      onChanged();
      return this;
    }

    private int type_ ;
    /**
     * <code>uint32 type = 11;</code>
     * @return The type.
     */
    @Override
    public int getType() {
      return type_;
    }
    /**
     * <code>uint32 type = 11;</code>
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(int value) {

      type_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 type = 11;</code>
     * @return This builder for chaining.
     */
    public Builder clearType() {
      bitField0_ = (bitField0_ & ~0x00000200);
      type_ = 0;
      onChanged();
      return this;
    }

    private int diamondCount_ ;
    /**
     * <code>uint32 diamondCount = 12;</code>
     * @return The diamondCount.
     */
    @Override
    public int getDiamondCount() {
      return diamondCount_;
    }
    /**
     * <code>uint32 diamondCount = 12;</code>
     * @param value The diamondCount to set.
     * @return This builder for chaining.
     */
    public Builder setDiamondCount(int value) {

      diamondCount_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 diamondCount = 12;</code>
     * @return This builder for chaining.
     */
    public Builder clearDiamondCount() {
      bitField0_ = (bitField0_ & ~0x00000400);
      diamondCount_ = 0;
      onChanged();
      return this;
    }

    private boolean isDisplayedOnPanel_ ;
    /**
     * <code>bool isDisplayedOnPanel = 13;</code>
     * @return The isDisplayedOnPanel.
     */
    @Override
    public boolean getIsDisplayedOnPanel() {
      return isDisplayedOnPanel_;
    }
    /**
     * <code>bool isDisplayedOnPanel = 13;</code>
     * @param value The isDisplayedOnPanel to set.
     * @return This builder for chaining.
     */
    public Builder setIsDisplayedOnPanel(boolean value) {

      isDisplayedOnPanel_ = value;
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     * <code>bool isDisplayedOnPanel = 13;</code>
     * @return This builder for chaining.
     */
    public Builder clearIsDisplayedOnPanel() {
      bitField0_ = (bitField0_ & ~0x00000800);
      isDisplayedOnPanel_ = false;
      onChanged();
      return this;
    }

    private long primaryEffectId_ ;
    /**
     * <code>uint64 primaryEffectId = 14;</code>
     * @return The primaryEffectId.
     */
    @Override
    public long getPrimaryEffectId() {
      return primaryEffectId_;
    }
    /**
     * <code>uint64 primaryEffectId = 14;</code>
     * @param value The primaryEffectId to set.
     * @return This builder for chaining.
     */
    public Builder setPrimaryEffectId(long value) {

      primaryEffectId_ = value;
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 primaryEffectId = 14;</code>
     * @return This builder for chaining.
     */
    public Builder clearPrimaryEffectId() {
      bitField0_ = (bitField0_ & ~0x00001000);
      primaryEffectId_ = 0L;
      onChanged();
      return this;
    }

    private Image giftLabelIcon_;
    private com.google.protobuf.SingleFieldBuilderV3<
        Image, Image.Builder, ImageOrBuilder> giftLabelIconBuilder_;
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     * @return Whether the giftLabelIcon field is set.
     */
    public boolean hasGiftLabelIcon() {
      return ((bitField0_ & 0x00002000) != 0);
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     * @return The giftLabelIcon.
     */
    public Image getGiftLabelIcon() {
      if (giftLabelIconBuilder_ == null) {
        return giftLabelIcon_ == null ? Image.getDefaultInstance() : giftLabelIcon_;
      } else {
        return giftLabelIconBuilder_.getMessage();
      }
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     */
    public Builder setGiftLabelIcon(Image value) {
      if (giftLabelIconBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        giftLabelIcon_ = value;
      } else {
        giftLabelIconBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     */
    public Builder setGiftLabelIcon(
        Image.Builder builderForValue) {
      if (giftLabelIconBuilder_ == null) {
        giftLabelIcon_ = builderForValue.build();
      } else {
        giftLabelIconBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     */
    public Builder mergeGiftLabelIcon(Image value) {
      if (giftLabelIconBuilder_ == null) {
        if (((bitField0_ & 0x00002000) != 0) &&
          giftLabelIcon_ != null &&
          giftLabelIcon_ != Image.getDefaultInstance()) {
          getGiftLabelIconBuilder().mergeFrom(value);
        } else {
          giftLabelIcon_ = value;
        }
      } else {
        giftLabelIconBuilder_.mergeFrom(value);
      }
      if (giftLabelIcon_ != null) {
        bitField0_ |= 0x00002000;
        onChanged();
      }
      return this;
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     */
    public Builder clearGiftLabelIcon() {
      bitField0_ = (bitField0_ & ~0x00002000);
      giftLabelIcon_ = null;
      if (giftLabelIconBuilder_ != null) {
        giftLabelIconBuilder_.dispose();
        giftLabelIconBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     */
    public Image.Builder getGiftLabelIconBuilder() {
      bitField0_ |= 0x00002000;
      onChanged();
      return getGiftLabelIconFieldBuilder().getBuilder();
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     */
    public ImageOrBuilder getGiftLabelIconOrBuilder() {
      if (giftLabelIconBuilder_ != null) {
        return giftLabelIconBuilder_.getMessageOrBuilder();
      } else {
        return giftLabelIcon_ == null ?
            Image.getDefaultInstance() : giftLabelIcon_;
      }
    }
    /**
     * <code>.Image giftLabelIcon = 15;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        Image, Image.Builder, ImageOrBuilder>
        getGiftLabelIconFieldBuilder() {
      if (giftLabelIconBuilder_ == null) {
        giftLabelIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            Image, Image.Builder, ImageOrBuilder>(
                getGiftLabelIcon(),
                getParentForChildren(),
                isClean());
        giftLabelIcon_ = null;
      }
      return giftLabelIconBuilder_;
    }

    private Object name_ = "";
    /**
     * <code>string name = 16;</code>
     * @return The name.
     */
    public String getName() {
      Object ref = name_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string name = 16;</code>
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string name = 16;</code>
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      name_ = value;
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }
    /**
     * <code>string name = 16;</code>
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00004000);
      onChanged();
      return this;
    }
    /**
     * <code>string name = 16;</code>
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }

    private Object region_ = "";
    /**
     * <code>string region = 17;</code>
     * @return The region.
     */
    public String getRegion() {
      Object ref = region_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        region_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string region = 17;</code>
     * @return The bytes for region.
     */
    public com.google.protobuf.ByteString
        getRegionBytes() {
      Object ref = region_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        region_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string region = 17;</code>
     * @param value The region to set.
     * @return This builder for chaining.
     */
    public Builder setRegion(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      region_ = value;
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     * <code>string region = 17;</code>
     * @return This builder for chaining.
     */
    public Builder clearRegion() {
      region_ = getDefaultInstance().getRegion();
      bitField0_ = (bitField0_ & ~0x00008000);
      onChanged();
      return this;
    }
    /**
     * <code>string region = 17;</code>
     * @param value The bytes for region to set.
     * @return This builder for chaining.
     */
    public Builder setRegionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      region_ = value;
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }

    private Object manual_ = "";
    /**
     * <code>string manual = 18;</code>
     * @return The manual.
     */
    public String getManual() {
      Object ref = manual_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        manual_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string manual = 18;</code>
     * @return The bytes for manual.
     */
    public com.google.protobuf.ByteString
        getManualBytes() {
      Object ref = manual_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        manual_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string manual = 18;</code>
     * @param value The manual to set.
     * @return This builder for chaining.
     */
    public Builder setManual(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      manual_ = value;
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }
    /**
     * <code>string manual = 18;</code>
     * @return This builder for chaining.
     */
    public Builder clearManual() {
      manual_ = getDefaultInstance().getManual();
      bitField0_ = (bitField0_ & ~0x00010000);
      onChanged();
      return this;
    }
    /**
     * <code>string manual = 18;</code>
     * @param value The bytes for manual to set.
     * @return This builder for chaining.
     */
    public Builder setManualBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      manual_ = value;
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }

    private boolean forCustom_ ;
    /**
     * <code>bool forCustom = 19;</code>
     * @return The forCustom.
     */
    @Override
    public boolean getForCustom() {
      return forCustom_;
    }
    /**
     * <code>bool forCustom = 19;</code>
     * @param value The forCustom to set.
     * @return This builder for chaining.
     */
    public Builder setForCustom(boolean value) {

      forCustom_ = value;
      bitField0_ |= 0x00020000;
      onChanged();
      return this;
    }
    /**
     * <code>bool forCustom = 19;</code>
     * @return This builder for chaining.
     */
    public Builder clearForCustom() {
      bitField0_ = (bitField0_ & ~0x00020000);
      forCustom_ = false;
      onChanged();
      return this;
    }

    private Image icon_;
    private com.google.protobuf.SingleFieldBuilderV3<
        Image, Image.Builder, ImageOrBuilder> iconBuilder_;
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     * @return Whether the icon field is set.
     */
    public boolean hasIcon() {
      return ((bitField0_ & 0x00040000) != 0);
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     * @return The icon.
     */
    public Image getIcon() {
      if (iconBuilder_ == null) {
        return icon_ == null ? Image.getDefaultInstance() : icon_;
      } else {
        return iconBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     */
    public Builder setIcon(Image value) {
      if (iconBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        icon_ = value;
      } else {
        iconBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00040000;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     */
    public Builder setIcon(
        Image.Builder builderForValue) {
      if (iconBuilder_ == null) {
        icon_ = builderForValue.build();
      } else {
        iconBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00040000;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     */
    public Builder mergeIcon(Image value) {
      if (iconBuilder_ == null) {
        if (((bitField0_ & 0x00040000) != 0) &&
          icon_ != null &&
          icon_ != Image.getDefaultInstance()) {
          getIconBuilder().mergeFrom(value);
        } else {
          icon_ = value;
        }
      } else {
        iconBuilder_.mergeFrom(value);
      }
      if (icon_ != null) {
        bitField0_ |= 0x00040000;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     */
    public Builder clearIcon() {
      bitField0_ = (bitField0_ & ~0x00040000);
      icon_ = null;
      if (iconBuilder_ != null) {
        iconBuilder_.dispose();
        iconBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     */
    public Image.Builder getIconBuilder() {
      bitField0_ |= 0x00040000;
      onChanged();
      return getIconFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     */
    public ImageOrBuilder getIconOrBuilder() {
      if (iconBuilder_ != null) {
        return iconBuilder_.getMessageOrBuilder();
      } else {
        return icon_ == null ?
            Image.getDefaultInstance() : icon_;
      }
    }
    /**
     * <pre>
     *  specialEffectsMap = 20;
     * </pre>
     *
     * <code>.Image icon = 21;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        Image, Image.Builder, ImageOrBuilder>
        getIconFieldBuilder() {
      if (iconBuilder_ == null) {
        iconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            Image, Image.Builder, ImageOrBuilder>(
                getIcon(),
                getParentForChildren(),
                isClean());
        icon_ = null;
      }
      return iconBuilder_;
    }

    private int actionType_ ;
    /**
     * <pre>
     * fixme 后面的就不写了还有几十个属性
     * </pre>
     *
     * <code>uint32 actionType = 22;</code>
     * @return The actionType.
     */
    @Override
    public int getActionType() {
      return actionType_;
    }
    /**
     * <pre>
     * fixme 后面的就不写了还有几十个属性
     * </pre>
     *
     * <code>uint32 actionType = 22;</code>
     * @param value The actionType to set.
     * @return This builder for chaining.
     */
    public Builder setActionType(int value) {

      actionType_ = value;
      bitField0_ |= 0x00080000;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * fixme 后面的就不写了还有几十个属性
     * </pre>
     *
     * <code>uint32 actionType = 22;</code>
     * @return This builder for chaining.
     */
    public Builder clearActionType() {
      bitField0_ = (bitField0_ & ~0x00080000);
      actionType_ = 0;
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:GiftStruct)
  }

  // @@protoc_insertion_point(class_scope:GiftStruct)
  private static final GiftStruct DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new GiftStruct();
  }

  public static GiftStruct getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<GiftStruct>
      PARSER = new com.google.protobuf.AbstractParser<GiftStruct>() {
    @Override
    public GiftStruct parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<GiftStruct> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<GiftStruct> getParserForType() {
    return PARSER;
  }

  @Override
  public GiftStruct getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

